<?php
/**
 *
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       app.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
 */
$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
$cakeVersion = __d('cake_dev', 'CakePHP %s', Configure::version())
?>
<!DOCTYPE html>
<html>
    <head>
        <?php echo $this->Html->charset(); ?>
        <title>
            <?php echo $cakeDescription ?>:
            <?php echo $title_for_layout; ?>
        </title>
        <meta charset="utf-8">
        <?php
        echo $this->Html->meta('icon');

        echo $this->Html->css(array('bootstrap.min.css', 'font/css/font-awesome.css', 'sb-admin.css'));
        echo $this->Html->script(array('jquery-1.10.2.js', 'bootstrap.min.js', 'plugins/metisMenu/jquery.metisMenu.js', 'sb-admin.js','jquery.mockjax.js','bootstrap_typeahead.js'));
        echo $this->fetch('meta');
        echo $this->fetch('css');
        echo $this->fetch('script');
        ?>
        <script>
            $(document).ready(function(){
                $(".language_value").on('click',function(){
                    var val = $(this).attr('href');
                    $("#changeLanguage").val(val);
                    $(this).parents('form').submit();
                    return false;
                });
            });
        </script>
    </head>
    <body>
        <div id="wrapper">

            <nav class="navbar navbar-default navbar-fixed-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="index.html">SB Admin v2.0</a>
                </div>
                <!-- /.navbar-header -->

                <ul class="nav navbar-top-links navbar-right">
                    
                    <!-- /.dropdown -->
                    <li class="dropdown">
                        <form action="<?php echo $this->here; ?>" method="post" >
                            <input type="hidden" name="changeLanguage" value="eng" id="changeLanguage" />
                            
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <i class="fa fa-tasks fa-fw"></i>  <i class="fa fa-caret-down"></i>
                        </a>
                        
                        <ul class="dropdown-menu dropdown-tasks">
                            <li>
                                <a href="eng" class="language_value" <?php echo Configure::read('Config.language')== "eng"?"style='color:red'":""?>>
                                    English
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="vn" class="language_value" <?php echo Configure::read('Config.language')== "vn"?"style='color:red'":""?>>
                                    Viet Nam
                                </a>
                            </li>
                            
                        </ul>
                        </form>
                        <!-- /.dropdown-tasks -->
                    </li>
                    <!-- /.dropdown -->
                    
                    <!-- /.dropdown -->
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <i class="fa fa-user fa-fw"></i>  <i class="fa fa-caret-down"></i>
                        </a>
                        <ul class="dropdown-menu dropdown-user">
                            <!--<li><a href="#"><i class="fa fa-user fa-fw"></i> User Profile</a>
                            </li>
                            <li><a href="#"><i class="fa fa-gear fa-fw"></i> Settings</a>
                            </li>
                            <li class="divider"></li>-->
                            <li><a href="<?php echo $this->Html->url("/Au/logout")?>"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
                            </li>
                        </ul>
                        <!-- /.dropdown-user -->
                    </li>
                    <!-- /.dropdown -->
                </ul>
                <!-- /.navbar-top-links -->

                <div class="navbar-default navbar-static-side" role="navigation">
                    <div class="sidebar-collapse">
                        <ul class="nav" id="side-menu">
                            <li class="sidebar-search">
                                <div class="input-group custom-search-form">
                                    <input type="text" class="form-control" placeholder="Search...">
                                    <span class="input-group-btn">
                                        <button class="btn btn-default" type="button">
                                            <i class="fa fa-search"></i>
                                        </button>
                                    </span>
                                </div>
                                <!-- /input-group -->
                            </li>
                            <li>
                                <a href="<?php echo $this->Html->url('/Simple'); ?>"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
                            </li>
                            <li>
                               
                                <a href="#"><i class="glyphicon glyphicon-th-list"></i> <?php echo __('Category'); ?><span class="fa arrow"></span></a>
                                <ul class="nav nav-second-level">
                                    <li>
                                        <a href = "<?php echo $this->Html->url('/category/index'); ?>" ><?php echo __('All category'); ?></a>
                                    </li>
                                    <li>
                                        <a href = "<?php echo $this->Html->url('/category/addcategory'); ?>" ><?php echo __('Create Category'); ?></a>
                                    </li>
                                </ul>
                                <!-- /.nav-second-level -->
                            </li>
                            <li>
                                <a href="#"><i class="fa fa-table fa-fw"></i> <?php echo __('Product'); ?><span class="fa arrow"></span></a>
                                <ul class="nav nav-second-level">
                                    <li>
                                        <a href = "<?php echo $this->Html->url('/product/index'); ?>" ><?php echo __('All').' '. __('Product'); ?></a>
                                    </li>
                                    <li>
                                        <a href = "<?php echo $this->Html->url('/product/addproducttype'); ?>" ><?php echo __('Create').' '. __('Product'); ?></a>
                                    </li>
                                </ul>
                                <!-- /.nav-second-level -->
                            </li>
                            <li>
                                <a href="#"><i class="fa fa-edit fa-fw"></i> <?php echo __('Property'); ?><span class="fa arrow"></span></a>
                                <ul class="nav nav-second-level">
                                    <li>
                                        <a href = "<?php echo $this->Html->url('/property/index'); ?>" ><?php echo __('All Property'); ?></a>
                                    </li>
                                    <li>
                                        <a href = "<?php echo $this->Html->url('/property/addpropertytype'); ?>" ><?php echo __('Create Property'); ?></a>
                                    </li>
                                </ul>
                                <!-- /.nav-second-level -->
                            </li>
                            <li>
                                <a href="#"><i class="fa fa-wrench fa-fw"></i> <?php echo __('Product Type'); ?><span class="fa arrow"></span></a>
                                <ul class="nav nav-second-level">
                                    <li>
                                        <a href = "<?php echo $this->Html->url('/Producttype/index'); ?>" ><?php echo __('All Product Type'); ?></a>
                                    </li>
                                    <li>
                                        <a href = "<?php echo $this->Html->url('/Producttype/edit'); ?>" ><?php echo __('Create Product Type'); ?></a>
                                    </li>
                                </ul>
                                <!-- /.nav-second-level -->
                            </li>
                            <li>
                                <a href="#"><i class="fa fa-sitemap fa-fw"></i> <?php echo __('Location'); ?><span class="fa arrow"></span></a>
                                <ul class="nav nav-second-level">
                                    <li>
                                        <a href="<?php echo $this->Html->url('/location/addlocation'); ?>"><?php echo __('Create Location'); ?></a>
                                    </li>
                                    <li>
                                        <a href="<?php echo $this->Html->url('/location/index'); ?>"><?php echo __('All Location'); ?></a>
                                    </li>
                                    
                                </ul>
                                <!-- /.nav-second-level -->
                            </li>
                            <li>
                                <a href="#"><i class="fa fa-files-o fa-fw"></i> <?php echo __('Setting')?><span class="fa arrow"></span></a>
                                <ul class="nav nav-second-level">
                                    <li>
                                        <a href="<?php echo $this->Html->url('/Setting/mail'); ?>"><?php echo __('Email')?></a>
                                    </li>
                                    <li>
                                        <a href="<?php echo $this->Html->url('/Setting/index'); ?>"><?php echo __('Config search') ?></a>
                                    </li>
                                </ul>
                                <!-- /.nav-second-level -->
                            </li>
                        </ul>
                        <!-- /#side-menu -->
                    </div>
                    <!-- /.sidebar-collapse -->
                </div>
                <!-- /.navbar-static-side -->
            </nav>
            <div style="float: right;width: 80%;margin-right: 10px;">
            <?php echo $this->Session->flash(); ?>
            </div>
            <?php echo $this->fetch('content'); ?>
            <!--<?php echo $this->element('sql_dump'); ?>-->
        </div>
        <!-- /#wrapper -->
    </body>
</html>
